package com.wnxy.eleba.controller;


import com.wnxy.eleba.entity.Customer;
import com.wnxy.eleba.utils.Result;
import org.springframework.web.bind.annotation.*;


@CrossOrigin
@RestController
@RequestMapping("/user")
public class LogerController_zhuying {


    @RequestMapping("/login")
    public Result longuser(@RequestBody Customer customer){
        System.out.println(customer);
        return Result.ok().data("token","admin");

    }


    @GetMapping("/info")
    public Result getUserInfo(String token){
        return Result.ok().data("roles", "[admin]").data("name", "admin").data("avatar", "https://wpimg.wallstcn.com/f778738c-e4f8-4870-b634-56703b4acafe.gif");
    }
}
